package ec.edu.udla.fichamedica.domain;

import java.util.Date;
import java.util.List;

import javax.persistence.Column;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.ManyToOne;
import javax.persistence.OneToMany;
import javax.persistence.OneToOne;


/**
 * @author Paul Cahue\u00F1as
 * @version 1.0
 * @created 27-jun-2010 15:48:40
 */
@javax.persistence.Entity
public class MedicalHistory {

	@Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
	private Long id;
	
	@Column
	private Date appointmentDate;
	
	@Column
	private String purpose;
	
	@ManyToOne
	private MedicalRecord medicalRecord;
	
	@OneToMany(mappedBy="medicalHistory")
	private List<MedicalHistoryParameter> medicalHistoryParameters;
	
	@OneToMany(mappedBy="medicalHistory")
	private List<HistoryDisease> historyDiseases;
	
	@OneToMany(mappedBy="medicalHistory")
	private List<MedicalExam> medicalExams;
	
	@OneToMany(mappedBy="medicalHistory")
	private List<Prescription> prescriptions;
	
	@OneToOne
	private Attention attention;

	public MedicalHistory(){

	}

	@Override
	public void finalize() throws Throwable {

	}

	public Long getId() {
		return id;
	}

	public void setId(Long id) {
		this.id = id;
	}

	public Date getAppointmentDate() {
		return appointmentDate;
	}

	public void setAppointmentDate(Date appointmentDate) {
		this.appointmentDate = appointmentDate;
	}

	public String getPurpose() {
		return purpose;
	}

	public void setPurpose(String purpose) {
		this.purpose = purpose;
	}

	public MedicalRecord getMedicalRecord() {
		return medicalRecord;
	}

	public void setMedicalRecord(MedicalRecord medicalRecord) {
		this.medicalRecord = medicalRecord;
	}

	public List<MedicalHistoryParameter> getMedicalHistoryParameters() {
		return medicalHistoryParameters;
	}

	public void setMedicalHistoryParameters(
			List<MedicalHistoryParameter> medicalHistoryParameters) {
		this.medicalHistoryParameters = medicalHistoryParameters;
	}

	public List<HistoryDisease> getHistoryDiseases() {
		return historyDiseases;
	}

	public void setHistoryDiseases(List<HistoryDisease> historyDiseases) {
		this.historyDiseases = historyDiseases;
	}

	public List<MedicalExam> getMedicalExams() {
		return medicalExams;
	}

	public void setMedicalExams(List<MedicalExam> medicalExams) {
		this.medicalExams = medicalExams;
	}

	public List<Prescription> getPrescriptions() {
		return prescriptions;
	}

	public void setPrescriptions(List<Prescription> prescriptions) {
		this.prescriptions = prescriptions;
	}

	public Attention getAttention() {
		return attention;
	}

	public void setAttention(Attention attention) {
		this.attention = attention;
	}

}